﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using AesonBaseFramework.EntityFramework.BaseEntities;

namespace AesonBaseFramework.EntityFramework.Validation
{
    public class EntityValidator
    {
        public static IEnumerable<ValidationResult> ValidateEntity<T>(T entity) where T : AesonBaseEntity
        {
            return new EntityValidation<T>().Validate(entity);
        }
    }
}
